/*
* // +-------------------------------------------------------------------------------------------------
* // |                 有你就好 [ 有节骨乃坚，无心品自端 ]     <http://encoding.wang>
* // +-------------------------------------------------------------------------------------------------
* // |                             独在异乡为异客         每逢佳节倍思亲
* // +-------------------------------------------------------------------------------------------------
* // |                 联系:   <707069100@qq.com>      <http://weibo.com/513778937>
* // +-------------------------------------------------------------------------------------------------
*/

// -----------------------------------------------------------------------------------------------------
// +----------------------------------------------------------------------------------------------------
// |                   ErYang出品 属于小极品          共同学习    共同进步
// +----------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------


package wang.encoding.mroot.common.util

/**
 * mybatis-plus 工具类
 *
 * @author ErYang
 */
object MybatisPlusUtil {

    /**
     * 创建查询的字段
     *
     * @param columnArray 字段集合
     *
     * @return String
     */
    fun initSqlSelect(columnArray: Array<String>): String? {
        if (columnArray.isNotEmpty()) {
            val stringBuilder = StringBuilder()
            val size: Int = columnArray.size
            var i = 0
            for (value: String in columnArray) {
                stringBuilder.append(value)
                i++
                if (i < size) {
                    stringBuilder.append(", ")
                }
            }
            return stringBuilder.toString()
        }
        return null
    }

    // -------------------------------------------------------------------------------------------------


}

// -----------------------------------------------------------------------------------------------------

// End MybatisPlusUtil class

/* End of file MybatisPlusUtil.kt */
/* Location: ./src/main/kotlin/wang/encoding/mroot/common/util/MybatisPlusUtil.kt */

// -----------------------------------------------------------------------------------------------------
// +----------------------------------------------------------------------------------------------------
// |                           ErYang出品 属于小极品  O(∩_∩)O~~   共同学习    共同进步
// +----------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------
